<template>
	<view>
		<view class="inputs">
			<textarea placeholder="请输入反馈内容..." v-model="content"></textarea>
		</view>
		<view class="btn" @click="han">
			提交
		</view>
	</view>
</template>

<script>
	import {
		addFeedback
	} from '@/common/http.api.js';
	export default {
		data() {
			return {
				content:''
			};
		},
		methods:{
			han(){
				if(this.content == ''){
					uni.showToast({
						title:'请输入反馈内容',
						duration:2000,
						mask:false,
						icon:"none"
					})
				}else{
					addFeedback({content:this.content}).then(res=>{
						if(res.code == 200){
							uni.showToast({
								title:'提交成功',
								duration:2000,
								mask:false,
								icon:"success"
							})
							setTimeout(()=>{
								uni.navigateBack()
							},1000)
						}
					
					})
				}
				
			}
		}
	}
</script>

<style lang="scss">
.inputs{
	width: 700rpx;
	height: 439rpx;
	background: #FFFFFF;
	border-radius: 14rpx;
	margin: 20rpx 25rpx;
	textarea{
		padding: 20rpx;
	}
}
.btn{
	width: 695rpx;
	height: 80rpx;
	background: #065CF7;
	border-radius: 40rpx;
	margin: 20rpx auto;
	text-align: center;
	line-height: 80rpx;
	color: #FFFFFF;
	font-size: 28rpx;
	font-weight: bold;
}
</style>
